package com.dalimao.verificationcodeinput.slice;

import com.dalimao.corelibrary.VerificationCodeInput;
import com.dalimao.corelibrary.utils.LogUtil;
import com.dalimao.verificationcodeinput.ResourceTable;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;

public class MainAbilitySlice extends AbilitySlice {

  private static final String  TAG = "MainAbilitySlice";

  @Override
  public void onStart(Intent intent) {
    super.onStart(intent);
    super.setUIContent(ResourceTable.Layout_ability_main);
    VerificationCodeInput input = (VerificationCodeInput) findComponentById(ResourceTable.Id_verificationCodeInput);
    input.setOnCompleteListener((content -> {
      LogUtil.debug(TAG, "完成输入：" + content);
    }));
  }

  @Override
  public void onActive() {
    super.onActive();
  }

  @Override
  public void onForeground(Intent intent) {
    super.onForeground(intent);
  }
}
